package com.xuecheng.content;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Slf4j
@SpringBootApplication
@ComponentScan(
        basePackages = {
                "com.xuecheng.content",
                "com.xuecheng.web",
                "com.xuecheng.mybaits"
        }
)
@MapperScan("com.xuecheng.content.mappers")
@EnableTransactionManagement
//指定feign接口
@EnableFeignClients("com.xuecheng.*.api")
//开启@Async异步处理
@EnableAsync
public class ContentApplication {
    public static void main(String[] args) {
        SpringApplication.run(ContentApplication.class,args);
        log.warn("项目已启动成功！");
    }
}
